As a fuel injection device called an injector has recently become pervasive, control of a fuel injection timing and control of quantity of fuel to be injected; that is, control of an air—fuel ratio, has become easy. As a result, fostering an increase in power, a reduction in fuel consumption, and cleansing of exhaust gases has become possible. In relation particularly to a timing at which fuel is to be injected from among the foregoing elements, strictly speaking, the state of an intake valve; that is, the phase state of a cam shaft, is detected, and fuel is usually injected in accordance with the thus-detected phase state. However, a so-called cam sensor to be used for detecting the phase state of the cam shaft is expensive. The cam sensor presents a problem of an increase in the size of a cylinder head of, particularly, a two-wheeled vehicle, and hence in many cases cannot be adopted. For this reason, an engine controller is proposed in, e.g., JP-A-10-227252, wherein the phase state of a crankshaft and an air intake pressure are detected, and the stroke state of a cylinder is then detected on the basis of these detection results. Use of this related-art technique enables detection of a stroke state without detecting the phase of a cam shaft. Hence, the fuel injection timing or the like can be controlled in accordance with the stroke state.
Detection of the phase state of the crankshaft requires formation of cogs in the crankshaft or an outer periphery of a member which rotates in synchronism with the crankshaft, detection of an approach to the cogs through use of a magnetic sensor or the like, transmission of a pulse signal, and detection of the pulse signal as a crank pulse. The phase state of the crankshaft is detected by numbering the thus-detected crank pulse. In order to effect numbering or the like, the cogs are often provided at uneven intervals. Specifically, the thus-detected crank pulse is characterized by a mark. Fuel injection timing and ignition timing are controlled in accordance with the thus-characterized crank pulse.
However, particularly in the case of an engine for a two-wheeled vehicle having a small displacement and a single cylinder, an engine speed greatly decreases when, e.g., a throttle is opened rapidly, detection of a crank pulse at that moment sometimes fails. Alternatively, electrical noise associated with firing may sometimes be detected erroneously as a crank pulse. If too many or too few crank pulses are detected; i.e., if crank pulse detection is erroneous, there will arise a problem of actual injection timing or ignition timing differing from controlled injection timing or controlled ignition timing. A specific technique for detecting occurrence of erroneous detection of such a crank pulse is never available.
The present invention is developed to solve the problem and aims at providing an engine controller capable of accurately detecting occurrence of erroneous detection of a crank pulse.